/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package chameleon.model.NuGatStructure.prop;

import chameleon.model.NuGatStructure.utils.Node;
import chameleon.model.NuGatStructure.fsm.GameBddFsm;
import chameleon.gameSolver.NuGat.NuGatInterface;
import com.sun.jna.Pointer;

/**
 *
 * @author simon
 */
public class PropGame extends Prop {
    
    public PropGame (Pointer prop, NuGatInterface  nugat){
        super (prop, nugat);
    }
    
    public PropGame (Node expression, int PropGame_Type, NuGatInterface nugat){
        super (nugat.PropGame_create_partial(expression.ptr(), PropGame_Type),nugat);
    }
    
    
    /**
     * Return the FSM that represent the game on BDD encoding
     * @return GameBddFsm 
     */
    public GameBddFsm getGameBddFsm(){
        return new GameBddFsm(nugat_.PropGame_get_game_bdd_fsm(this.ptr()), nugat_);
    }
    
    public void setGameBddFsm(GameBddFsm fsm){
        nugat_.PropGame_set_game_bdd_fsm(this.ptr(), fsm.ptr());
    }
    
    public String getPlayer(){
        return nugat_.get_text(nugat_.PropGame_get_player(this.ptr()));
    }
}
